/**
 * Created with IntelliJ IDEA.
 * User: liulinhui
 * Date: 18-10-9
 * Time: 上午10:31
 * Description: chainApi
 */
import serverService from '@/utils/requestWeb';

/**
 * 创建btc账号
 * @param userId 用户ID coinName 币种名称
 */
export function addBtcAddress(creds) {
  return serverService({
    url: '/rpc/account',
    method: 'post',
    headers:{
      'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
    },
    data: creds
  })
}

/**
 * 获取btc账号
 * @param creds （ userId 用户ID 和coinName 币种名称）
 */
export function getBtcAddress(creds) {
  return serverService({
    url: '/rpc/getAddress',
    method: 'post',
    headers:{
      'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
    },
    data: creds

  })
}


